﻿@model List<Sykj.Entity.Permissions>
@{
    if (Model.Count > 0)
    {
        @foreach (var item in Model.Where(c => c.Type == 1))
        {
            <li class="layui-nav-item">
                <a href="javascript:;" lay-tips="@item.Title" lay-direction="2">
                    <i class="layui-icon">@Html.Raw(item.Icon) </i>
                    <cite>@item.Title</cite>
                </a>
                <dl class="layui-nav-child">
                    @if (Model.Where(c => c.ParentId == item.PermissionId).Count() > 0)
                    {
                        foreach (var item2 in Model.Where(c => c.ParentId == item.PermissionId))
                        {
                            <dd>
                                <a lay-href="@(item2.Url)">@item2.Title</a>
                            </dd>
                        }
                    }
                </dl>
            </li>
        }
    }
}